package com.yuw.hw7;

public class Vehicle {
	
	//属性
	private String  vehicleName;
	private String vehicleColor;
	private double vehicleSpeed;
	
	//行为
	
	/**
	 * 
	 */
	public Vehicle() {
		super();
		//原始速度为0
				this.vehicleSpeed = 0.0;
	}


	/**构造方法
	 * @param vehicleName
	 * @param vehicleColor
	 * @param vehicleSpeed
	 */
	public Vehicle(String vehicleName, String vehicleColor ) {
		super();
		this.vehicleName = vehicleName;
		this.vehicleColor = vehicleColor;
		//原始速度为0
		this.vehicleSpeed = 0.0;
	}
	
	
	/**
	 * 形式行为
	 */
	public void drive() {
		System.out.println(vehicleColor+"颜色的"+vehicleName+"品牌的汽车正在以"+vehicleSpeed+"速度进行行驶");
	}


	public String getVehicleName() {
		return vehicleName;
	}


	


	public String getVehicleColor() {
		return vehicleColor;
	}


	public void setVehicleColor(String vehicleColor) {
		this.vehicleColor = vehicleColor;
	}


	public double getVehicleSpeed() {
		return vehicleSpeed;
	}


	public void setVehicleSpeed(double vehicleSpeed) {
		this.vehicleSpeed = vehicleSpeed;
	}
	

}
